package com.aiphome.repository;

import com.aiphome.model.AiService;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface AiServiceRepository extends JpaRepository<AiService, Long>, JpaSpecificationExecutor<AiService> {
    
    List<AiService> findByActiveTrue();
    
    List<AiService> findByServiceType(String serviceType);
    
    Optional<AiService> findByName(String name);
    
    List<AiService> findByServiceTypeAndActiveTrue(String serviceType);
}